 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.viettel.core.dao.cms.ExpertTechniqueDAO;
import com.viettel.core.entities.cms.ExpertTechnique;
import com.viettel.core.exceptions.BusinessException;
import com.viettel.core.exceptions.DataAccessException;
/** 
 *  @author: HUYNHDC
 *  @version:  
 *  @since: 24/06/2014 - 10:50:59
 */
 public class ExpertTechniqueMgrImpl implements ExpertTechniqueMgr{ 
	@Autowired 
	ExpertTechniqueDAO expertTechniqueDAO; 
 
	/** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
 	@Override 
	public ExpertTechnique getExpertTechniqueById(Integer id) throws BusinessException { 
		try { 
			return  expertTechniqueDAO.getExpertTechniqueById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 	/** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
 	@Override 
	public ExpertTechnique createExpertTechnique(ExpertTechnique expertTechnique) throws BusinessException { 
		try { 
			return expertTechniqueDAO.createExpertTechnique(expertTechnique); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 	/** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	 public List<ExpertTechnique> lstExpertTechniqueByCmsUserId(Integer id) throws BusinessException{
		 try { 
				return expertTechniqueDAO.lstExpertTechniqueByCmsUserId(id); 
			} catch (DataAccessException e) { 
				throw new BusinessException(e); 
			} 
	 }
	 /** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	 public List<ExpertTechnique> lstExpertTechniqueByTechniqueId(Integer id) throws BusinessException{
		 try { 
				return expertTechniqueDAO.lstExpertTechniqueByTechniqueId(id); 
			} catch (DataAccessException e) { 
				throw new BusinessException(e); 
			} 
	 }
 	
	 /** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
 	@Override 
	public void updateExpertTechnique(ExpertTechnique expertTechnique) throws BusinessException { 
		try { 
			expertTechniqueDAO.updateExpertTechnique(expertTechnique); 
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/** 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
 	@Override 
	public void deleteExpertTechnique(ExpertTechnique expertTechnique) throws BusinessException { 
		try { 
			expertTechniqueDAO.deleteExpertTechnique(expertTechnique); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}
 	/**
	   * 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	@Override 
	public void deleteExpertTechniqueByCmsUserId(Integer id) throws BusinessException { 
		try { 
			expertTechniqueDAO.deleteExpertTechniqueByCmsUserId(id);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}

} 
